package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class IntersectNonJoinQueryTerm implements NonJoinQueryTerm {

    private int beginIndex;
    private int endIndex;
    private QueryTerm queryTerm;
    private boolean all;
    private boolean distinct;
    private CorrespondingSpec correspondingSpec;
    private QueryPrimary queryPrimary;

    public IntersectNonJoinQueryTerm(QueryTerm queryTerm,
                                     boolean all,
                                     boolean distinct,
                                     CorrespondingSpec correspondingSpec,
                                     QueryPrimary queryPrimary) {
        this.beginIndex = queryTerm.getBeginIndex();
        this.endIndex = queryPrimary.getEndIndex();
        this.queryTerm = queryTerm;
        this.all = all;
        this.distinct = distinct;
        this.correspondingSpec = correspondingSpec;
        this.queryPrimary = queryPrimary;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public QueryTerm getQueryTerm() {
        return queryTerm;
    }

    public boolean isAll() {
        return all;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public CorrespondingSpec getCorrespondingSpec() {
        return correspondingSpec;
    }

    public QueryPrimary getQueryPrimary() {
        return queryPrimary;
    }

}
